<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            background-color: rgb(24, 23, 23);
        }

        body {
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .con {
            position: relative;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: rgb(168, 168, 168);
            border: 5px solid beige;
            z-index: 22;
            overflow: hidden;
            margin-bottom: 30px;
        }

        .water {
            position: absolute;
            left: -33%;
            top: 70%;
            width: 180px;
            height: 180px;
            border-radius: 70px;
            background-color: skyblue;
            margin-right: 300px;
            z-index: 1;
            animation: rotateKey 5s linear infinite;
        }

        .percent {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: transparent;
            color: #fff;
            font-size: 23px;
            z-index: 99;
        }

        @keyframes rotateKey {
            to {
                transform: rotate(360deg);
            }
        }
    </style>
</head>

<body>
    <div class="con">
        <div class="water"></div>
        <span class="percent"></span>
    </div>
    <input type="range" value="3" max="10" min="0">

</body>
<script>
    const rangeEl = document.querySelector("input");
    const waterEl = document.querySelector(".water");
    const percentEl = document.querySelector(".percent");
    percentEl.innerText = `${rangeEl.value*10}%`
    rangeEl.oninput = (el) => {
        let value = el.target.value;
        if (value == 0) {
            waterEl.style.display = "none"
        } else {
            waterEl.style.display = "block"
            waterEl.style.top = `${100-value*10}%`
        }
        percentEl.innerText = `${value*10}%`
    }
</script>

</html>